1 HAK comparison of CASAL and Casal2 model configurations

This document compares the results of at least 2 CASAL model configurations (base and at least one sensitivity) and up to 6 Casal2 model configurations (3 BetaDiff and 3 ADOL-C).

The CASAL model sensitivity 1 has a smaller minimisation tolerance value than the CASAL base model (1e-6 vs. 2e-3).

The Casal2 ADOL-C and BetaDiff low tolerance models have a smaller tolerance value than the CASAL base model (1e-6 vs. 2e-3).

1.1 HAK model characteristics

The main characteristics of the Test Case HAK (hake) CASAL model are:

  • one stock, ages 1 - 30
  • one area
  • years 1975 - 2018, projection years 2019 - 2022
  • two time steps, duration 7 months and 5 months
  • recruitment, spawning, aging, maturation, fishing in time step 1
  • two stock categories: males and females, with user-provided maturity-at-age ogive
  • natural mortality (M) of 0.19
  • Beverton-Holt stock-recruitment relationship, with steepness (h) 0.8
  • sex-specific Schnute age-length relationship
  • sex-specific length-weight relationship (\(W = aL^b\))
  • ageing error type normal (c = 0.08)
  • one fishery with logistic selectivity-at-age
  • one survey with logistic selectivity-at-age

Observation data include:

  • fishery CPUE index
  • fishery proportions-at-age
  • survey biomass index
  • survey proportions-at-age

Parameters estimated include:

  • B0
  • catchability (q) for the fishery CPUE index and for the survey index
  • fishery and survey selectivity parameters a50 and ato95
  • YCS (recruitment deviations)

1.2 HAK model MCMC specifications

The CASAL MCMC options include

  • start 0.5
  • length 11000000
  • stepsize 0.001
  • keep 1000
  • adaptive_stepsize True
  • adapt_at 10000 20000 30000 40000 50000 100000 200000 300000 4000000 500000 600000 700000 800000
  • df 2
  • burn_in 1000
  • proposal_t True

The Casal2 ADOL-C and BetaDiff MCMC options include

  • start 0.5
  • length 11000000
  • step_size 0.001
  • keep 1000
  • adapt_stepsize_at 10000 20000 30000 40000 50000 100000 200000 300000 4000000 500000 600000 700000 800000
  • df 2
  • proposal_distribution t
  • adapt_stepsize_method double_half
  • max_correlation 0.8

1.3 R environment

## [1] "Thu Jan 13 13:42:17 2022"
## R version 4.1.2 (2021-11-01)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Debian GNU/Linux bookworm/sid
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.18.so
## 
## locale:
##  [1] LC_CTYPE=en_NZ.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_NZ.UTF-8        LC_COLLATE=en_NZ.UTF-8    
##  [5] LC_MONETARY=en_NZ.UTF-8    LC_MESSAGES=en_NZ.UTF-8   
##  [7] LC_PAPER=en_NZ.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] Casal2_21.11   casal_2.30     devtools_2.4.3 usethis_2.1.5  rlist_0.4.6.2 
##  [6] ggthemes_4.2.4 gridExtra_2.3  coda_0.19-4    ggmcmc_1.5.1.1 ggplot2_3.3.5 
## [11] tidyr_1.1.4    huxtable_5.4.0 dplyr_1.0.7    plyr_1.8.6    
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.7         lattice_0.20-45    prettyunits_1.1.1  ps_1.6.0          
##  [5] assertthat_0.2.1   rprojroot_2.0.2    digest_0.6.29      utf8_1.2.2        
##  [9] R6_2.5.1           evaluate_0.14      pillar_1.6.4       rlang_0.4.12      
## [13] data.table_1.14.2  callr_3.7.0        jquerylib_0.1.4    rmarkdown_2.11    
## [17] desc_1.4.0         stringr_1.4.0      munsell_0.5.0      compiler_4.1.2    
## [21] xfun_0.29          pkgconfig_2.0.3    pkgbuild_1.3.1     htmltools_0.5.2   
## [25] tidyselect_1.1.1   tibble_3.1.6       reshape_0.8.8      fansi_0.5.0       
## [29] crayon_1.4.2       withr_2.4.3        grid_4.1.2         jsonlite_1.7.2    
## [33] GGally_2.1.2       gtable_0.3.0       lifecycle_1.0.1    DBI_1.1.2         
## [37] magrittr_2.0.1     scales_1.1.1       cli_3.1.0          stringi_1.7.6     
## [41] cachem_1.0.6       fs_1.5.2           remotes_2.4.2      testthat_3.1.1    
## [45] bslib_0.3.1        ellipsis_0.3.2     generics_0.1.1     vctrs_0.3.8       
## [49] RColorBrewer_1.1-2 tools_4.1.2        glue_1.6.0         purrr_0.3.4       
## [53] processx_3.5.2     pkgload_1.2.4      fastmap_1.1.0      yaml_2.2.1        
## [57] colorspace_2.0-2   sessioninfo_1.2.2  memoise_2.0.1      knitr_1.37        
## [61] sass_0.4.0

1.4 CASAL and Casal2 model output

# source('../../R-functions/report_read_in_CASAL_MPD_files.R')
source('../../R-functions/report_read_in_CASAL_MCMC_files.R')
source('../../R-functions/report_read_in_Casal2_MPD_files.R')
source('../../R-functions/report_read_in_Casal2_MCMC_files.R')

1.5 MCMC diagnostics

1.5.1 Diagnostics for the CASAL and Casal2 model MCMC results

For the diagnostics below, the last 10000 samples for each chain are used and subsampled at 10, so that 1000 samples are input into the diagnostic functions.